<%@page pageEncoding="UTF-8" isELIgnored="false"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="f" uri="http://www.slim3.org/functions"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>category Index</title>
<link rel="stylesheet" type="text/css" href="/css/global.css" />
</head>
<body>
<p>カテゴリ一覧</p>
<a href="${f:url('add')}">追加</a>
<table border="1" cellspacing="0">
<thead>
	<tr>
		<th>Key</th>
		<th>名前</th>
		<th>Todo List</th>
		<th colspan="2">未実装</th>
	</tr>
</thead>
<tbody>
<c:forEach var="e" items="${list}">
<tr>
	<td>${f:h(e.stringKey)}</td>
	<td>${f:h(e.name)}</td>
	<td>
	
<%--
	<ul>
	<c:forEach var="t" items="${e.todos}">
		<li>${f:h(t.content)}</li>
	</c:forEach>
	</ul>
--%>
	</td>
	<td><a href="${f:url(editUrl)}">Edit</a></td>
	<td><a href="${f:url(deleteUrl)}" onclick="return confirm('delete OK?')">Delete</a></td>
</tr>
</c:forEach>
</tbody>
</table>
</body>
</html>
